//
//  SHYCommonConfig.h
//  Pods
//
//  Created by sunhaiyan on 16/6/28.
//
//

#ifndef SHYCommonConfig_h
#define SHYCommonConfig_h


#define IOS8                        ([[UIDevice currentDevice].systemVersion floatValue] >= 8.f)
#define IOS7                        ([[UIDevice currentDevice].systemVersion floatValue] >= 7.f)


#define IPHONE_SCREEN_WIDTH         ([[UIScreen mainScreen] bounds].size.width)
#define IPHONE_SCREEN_HEIGHT        ([[UIScreen mainScreen] bounds].size.height)
#define IPHONE_NAVIGATIONBAR_HEIGHT (IOS7 ? 64 : 44)
#define IPHONE_STATUSBAR_HEIGHT     (IOS7 ? 20 : 0)

#define IPHONE6P_SCREEN_WIDTH       414
#define IPHONE6P_SCREEN_HEIGHT      736

#define IS_IPHONE5                  (([[UIScreen mainScreen] bounds].size.height - 568) ? NO : YES)

#define isiPhone6                   ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)

#define isiPhone6Plus               (([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO) || ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2001), [[UIScreen mainScreen] currentMode].size) : NO))

#define isiPhone5                   ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)

#define isLargerThanIPhone4         (([[UIScreen mainScreen] bounds].size.height > 480.0f) ? YES : NO)

#define isiPhone4                   ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)

#define kCacheDirectory             [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject]


#endif /* SHYCommonConfig_h */
